﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace Nb.Web
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("{*allfavicon}", new { allfavicon = @".*\.ico(/?.*)?" });
            routes.IgnoreRoute("{*allaxd}", new { allaxd = @".*\.axd(/?.*)?" });
            routes.IgnoreRoute("{*alljpg}", new { alljpg = @".*\.jpe?g(/?.*)?" });
            routes.IgnoreRoute("{*allaspx}", new { allaspx = @".*\.aspx(/?.*)?" });

            //CmsRouteConfig.RegisterRoutes(routes);

            routes.MapRoute(
                "",
                "",
                new { controller = "Home", action = "Index" },
                new[] { NbWebConst.Nb_Web_Controllers }
            );


            routes.MapRoute(
                "Common_Default",
                "Common/{controller}/{action}",
                new[] { NbWebConst.Nb_Web_Controllers, NbWebConst.Nb_Web_Common_Controllers }
            );
        }
    }
}
